const editView = (localData) => {

    let markup = `
<ul id="tabbutton">
<li class="hover">中文</li>
<li>英文</li>
</ul>
<form action="" class="form-horizontal modal-form" role="form" id="form">
<div class="form-group">
        <label for="p_cid" class="col-sm-2 control-label">产品分类:</label>
        <div class="col-sm-9">
          <select name="p_cid" id="p_cid" class="form-control" >
          </select>
          <input type="hidden" id="id" name="id" value="{{:id}}" class="form-control">
        </div>
</div>
 <div class="form-group">
        <label for="thumb" class="col-sm-2 control-label">缩略图:</label>
        <div class="col-sm-9">
            <div class="uploader" id="uploader1">
                <div id="picker3">上传</div>
                 <div class="list"></div>
                <input type="hidden" id="thumb"  name="thumb" class="form-control" data-tips="1">
             </div>
        </div>
</div>
 <div class="form-group">
        <label for="enclosure" class="col-sm-2 control-label">附件:</label>
        <div class="col-sm-9">
            <div class="uploader" id="uploader2">
                <div id="picker4">上传</div>
                 <div class="list"></div>
                <input type="hidden" id="enclosure"  name="enclosure" class="form-control" data-tips="1">
             </div>
        </div>
</div>
<div class="form-group">
        <label  class="col-sm-2 control-label">类型:</label>
        <div class="col-sm-9">
            <div class="form-control radio-box resetActive">
                <input type="radio" id="equip" name="type" {{if  ~formatNum(type)===2 }}checked{{/if}}  value="2"><label for="equip">设备</label>
                <input type="radio" id="pro" name="type" {{if  ~formatNum(type)===1 }}checked{{/if}}  value="1"><label for="pro">产品</label>
             </div>
        </div>
</div>
<div class="baseInfo active">   
    <div class="form-group">
        <label for="name_zh" class="col-sm-2 control-label">中文产品名:</label>
        <div class="col-sm-9">
            <input type="text" id="name_zh" name="name_zh" value="{{:name_zh}}" class="form-control">
        </div>
    </div>
     <div class="form-group">
        <label for="keyword_zh" class="col-sm-2 control-label">中文产品型号:</label>
        <div class="col-sm-9">
            <input type="text" id="version_zh" name="version_zh" value="{{:version_zh}}" class="form-control">
        </div>
    </div>
     <div class="form-group explain">
        <label for="explain_zh " class="col-sm-2 control-label">中文产品说明:</label>
        <div class="col-sm-9">
            <textarea class="form-control" rows="4" name="explain_zh" id="explain_zh">{{:explain_zh}}</textarea>
        </div>
    </div>
     <div class="form-group">
        <label for="local_zh" class="col-sm-2 control-label">产地(中文):</label>
        <div class="col-sm-9">
            <input type="text" id="local_zh" name="local_zh" value="{{:local_zh}}" class="form-control">
        </div>
</div>
</div>
<div class="detail shownone">
   <div class="form-group">
        <label for="title_zh" class="col-sm-2 control-label">英文产品名:</label>
        <div class="col-sm-9">
            <input type="text" id="name_en" name="name_en" value="{{:name_en}}" class="form-control">
        </div>
    </div>
     <div class="form-group">
        <label for="keyword_en" class="col-sm-2 control-label">英文产品型号:</label>
        <div class="col-sm-9">
            <input type="text" id="version_en" name="version_en" value="{{:version_en}}" class="form-control">
        </div>
    </div>
     <div class="form-group explain">
        <label for="explain_en " class="col-sm-2 control-label">英文产品说明:</label>
        <div class="col-sm-9">
            <textarea class="form-control" rows="4" name="explain_en" id="explain_en">{{:explain_en}}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label for="local_en" class="col-sm-2 control-label">产地(英文):</label>
        <div class="col-sm-9">
            <input type="text" id="local_en" name="local_en" value="{{:local_en}}" class="form-control">
        </div>
</div>
</div>
<div id="product">
 <div class="form-group">
        <label for="accuracy" class="col-sm-2 control-label">产品精度:</label>
        <div class="col-sm-9">
            <input type="text" id="accuracy" name="accuracy" value="{{:accuracy}}" class="form-control">
        </div>
    </div>
</div>
<div id="equipment">
<div class="form-group">
        <label for="brand" class="col-sm-2 control-label">品牌:</label>
        <div class="col-sm-9">
            <input type="text" id="brand" name="brand" value="{{:brand}}"class="form-control">
        </div>
</div>
<div class="form-group">
        <label for="number" class="col-sm-2 control-label">数量:</label>
        <div class="col-sm-9">
            <input type="text" id="number" name="number" value="{{:number}}" class="form-control">
        </div>
</div>
</div>
<div class="form-group">
        <label for="sort" class="col-sm-2 control-label">排序:</label>
        <div class="col-sm-9">
            <input type="text" id="sort" name="sort"  value="{{:sort}}"class="form-control"  placeholder="数值越大越靠前" >
        </div>
</div>


<div class="form-group">
        <div class="btn-box">
          <input type="button" class="btn btn-primary" id="submitBtn"  value="提交">
        </div>
</div>
</form>
    `;
    let template = $.templates(markup);
    let compiledHtml = template.render(localData);
    return compiledHtml;
};

export {
    editView
}